package com.weitu.threeSimultaneities.fire.service.impl;

import com.weitu.threeSimultaneities.fire.entity.FireDesign;
import com.weitu.threeSimultaneities.fire.mapper.FireDesignMapper;
import com.weitu.threeSimultaneities.fire.service.FireDesignService;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FireDesignServiceImpl implements FireDesignService {
    @Autowired
    private FireDesignMapper fireDesignMapper;


    @Override
    public FireDesign selectBySubjectId(String id) {
        return this.fireDesignMapper.selectBySubjectId(id);
    }

    @Override
    public int deleteBySubjectId(String id) {
        return this.fireDesignMapper.deleteBySubjectId(id);
    }

    @Override
    public int insertSelective(Map<String,Object> paramMap) {
        this.fireDesignMapper.deleteBySubjectId(paramMap.get("subjectId").toString());
        return this.fireDesignMapper.insertSelective(paramMap);
    }
}